<!-- 消息提醒 -->
<template>
    <div class="notice">
        <van-nav-bar title="消息提醒" :border="false" left-arrow @click-left="goBack" />
        <div class="notice-box">
            <div class="table-header">
                <div class="index">序号</div>
                <div class="time">时间</div>
                <div class="type">提醒类型</div>
                <div class="content">内容</div>
            </div>
            <div class="table-body">
                <div class="table-tr" v-for="(item, index) in noticeList" :key="item.id">
                    <div class="td">{{ item.id }}</div>
                    <div class="td">{{ item.time }}</div>
                    <div class="td">{{ item.type }}</div>
                    <div class="td">{{ item.content }}</div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
import { ref } from "vue"
const router = useRouter()
function goBack() {
    router.go(-1)
}
const noticeList = ref([
    {
        id: 1,
        time: '2024-08-12 06:55',
        type: '收运车到达',
        content: '湿垃圾车预计5分钟后到达'
    },
    {
        id: 2,
        time: '2024-08-1206:55',
        type: '收运车到达',
        content: '湿垃圾收运量1包'
    }
])
</script>

<style lang="scss" scoped>
.notice {
    background: #fff;
    
}

.notice-box {
    height: calc(100vh - 92px - 20px);
    padding: 24px 30px;
    box-sizing: border-box;
    margin-top: 20px;
    width: 750px;
    border-radius: 30px 30px 0px 0px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px -8px 10px 4px rgba(218, 231, 245, 0.5);

    .table-header {
        display: flex;
        font-size: 24px;
        color: rgba(166, 166, 166, 1);
        text-align: center;
        vertical-align: middle;

        >div {
            width: 30%;
        }

        .index {
            width: 10%;
        }

        // .time,
        // .type {
        //     width: 25%;
        // }

        // .content {
        //     width: 40%;
        // }
    }

    .table-body {
        margin-top: 27px;
        font-size: 22px;
        color: rgba(51, 51, 51, 1);
        text-align: center;
        vertical-align: middle;

        .table-tr {

            display: flex;
            align-items: center;
            border-bottom: 1px solid rgba(239, 239, 239, 1);
            height: 80px;

            .td {
                width: 30%;
            }

            .td:first-child {
                width: 10%;
            }
        }
    }
}

::v-deep(.van-nav-bar .van-icon) {
    color: rgba(3, 8, 26, 1);
}
</style>